package com.wn.class30.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * aftersale
 * @author 
 */
@Data
public class Aftersale implements Serializable {
    /**
     * 售后服务ID
     */
    private Integer aftersaleId;

    /**
     * 售后服务编号
     */
    private String aftersaleNumber;

    /**
     * 订单编号
     */
    private String orderNumber;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 售后类型（1、七天无理由；2、质量问题；3、卖家发错货）
     */
    private Integer aftersaleType;

    /**
     * 退款原因
     */
    private String aftersaleDesc;

    /**
     * 退款价格
     */
    private Double refundprice;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss")
    private Date createtime;

    /**
     * 审核状态（1：待审核；2：已审核；3：已拒绝）
     */
    private Integer auditingstatus;

    private User user;

    private static final long serialVersionUID = 1L;



    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", aftersaleId=").append(aftersaleId);
        sb.append(", aftersaleNumber=").append(aftersaleNumber);
        sb.append(", orderNumber=").append(orderNumber);
        sb.append(", userId=").append(userId);
        sb.append(", aftersaleType=").append(aftersaleType);
        sb.append(", aftersaleDesc=").append(aftersaleDesc);
        sb.append(", refundprice=").append(refundprice);
        sb.append(", createtime=").append(createtime);
        sb.append(", auditingstatus=").append(auditingstatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}